package com.mk3.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mk3.model.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: peisong.chen
 * @Date: 2019/12/27 10:36
 * @Description:
 */
public interface UserMapper extends BaseMapper<User> {
    /**
     * 普通查询
     *
     * @param userName
     * @return
     */
    User getUserByName(String userName);

    /**
     * 分页查询
     *
     * @param page
     * @param name
     * @return
     */
    IPage<User> getUsersPage(Page page, @Param("name") String name);
}
